import request from '@/api/request'

export function addressList() { // 地址列表
  return request({
    url: `/lejuAdmin/companyAddress/addressList`,
    method: 'get'
  })
}
export function companyAddress(id) { // 删除
  return request({
    url: `/lejuAdmin/companyAddress/${id}`,
    method: 'delete'
  })
}

export function setSendOne(data) { // 默认发货
  return request({
    url: `/lejuAdmin/companyAddress/setSendOne`,
    method: 'post',
    data
  })
}
export function setReceiveOne(data) { // 默认收货
  return request({
    url: `/lejuAdmin/companyAddress/setReceiveOne`,
    method: 'post',
    data
  })
}

export function save(data) { // 新增地址
  return request({
    url: `/lejuAdmin/companyAddress/save`,
    method: 'post',
    data
  })
}

export function update(data) { // 编辑地址
  return request({
    url: `/lejuAdmin/companyAddress/update`,
    method: 'post',
    data
  })
}

export function companyAddres(id) { // 编辑地址
  return request({
    url: `/lejuAdmin/companyAddress/${id}`,
    method: 'get'
  })
}

